<template>
  <div class="bigContent">
      User的使用: {{ username }}---{{ route.params.id }}
  </div>
</template>

<script>
import { useRoute } from 'vue-router'
export default {
  created () {
    console.log('路由对象====', this.$route)
  },
  computed: {
    username () {
      return this.$route.params.username
    }
  },
  setup () {
    // setup 获取路由对象
    const route = useRoute()
    console.log('route====', route.params.username)
    return {
      route
    }
  }
}
</script>

<style scoped>

</style>
